<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!--引入本地layui.css-->
    <link rel="stylesheet" href="../../../layui/css/layui.css" media="all">
    <!--引入本地自定义的admin、login.css-->
    <link rel="stylesheet" href="../../../layui/layuiAdmin/css/admin.css" media="all">
    <!-- 引入刚刚下载的 ECharts 文件 -->
    <script src="../../../js/echarts.min.js"></script>
    <script type="text/javascript" src="../../../layui/layui.js"></script>
    <script type="text/javascript" src="../../../js/jquery-2.0.3.min.js"></script>
</head>
<body>
<!-- 为ECharts准备一个具备大小（宽高）的Dom -->
<div id="main" style="width: 1300px;height:600px;"></div>
<script src="../../../js/jquery-2.0.3.min.js"></script>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));

    // 指定图表的配置项和数据
    option = {
        title: {
            text: '患者不良反应',
            subtext: 'Adverse reactions in patients',
            left: 'center'
        },
        tooltip: {
            trigger: 'item',
            formatter: '{a} <br/>{b} : {c} ({d}%)'
        },
        legend: {
            orient: 'vertical',
            left: 'left',
            data: ['呕吐', '皮肤剥脱', '喉头水肿', '腹泻', '四肢乏力','发烧','口腔溃疡','呼吸困难']
        },
        series: [
            {
                name: '发作次数',
                type: 'pie',
                radius: '55%',
                center: ['50%', '60%'],
                data: [
                    {value: 3, name: '呕吐'},
                    {value: 1, name: '皮肤剥脱'},
                    {value: 4, name: '喉头水肿'},
                    {value: 2, name: '腹泻'},
                    {value: 1, name: '四肢乏力'},
                    {value: 1, name: '发烧'},
                    {value: 4, name: '口腔溃疡'},
                    {value: 3, name: '呼吸困难'}
                ],
                emphasis: {
                    itemStyle: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>

</body>
</html>